<template>
	<div id="business-app">
		<div class="cat-search">
			<form action="javascript:void(0);" onsubmit="searchStores();"><i class="fa fa-search"></i> <input type="search" id="keyword"
				 name="kw" placeholder="搜索商户" autocomplete="off"></form>
		</div>

		<BusinessTable :stores="store"></BusinessTable>
	</div>
</template>

<script>
	import BusinessTable from "@/components/business/_table.vue"
	export default {
		data() {
			return {
				store: []
			}
		},
		components: {
			BusinessTable: BusinessTable
		},
		beforeCreate: function() {
			this.$http.get(config.ApiUrl + '/shop/chainlist').then(
				response => {
					this.store = response.body.data;
					//console.log( response.body.data);
				}
			);
		},
		mounted: function() {
			//alert(1);
		}

	}
</script>

<style>
	.cat-search {
		background-color: #fff;
		padding: .5rem;
		text-align: center;
		position: relative;
	}

	.cat-search i {
		position: absolute;
		left: 6%;
		font-size: 1.1rem;
		color: #999;
		top: 30%;
	}

	.cat-search input {
		background-color: #f9f9f9;
		border-radius: 15px;
		font-size: 14px;
		padding: 8px 0;
		color: #110707;
		-webkit-appearance: none;
		text-indent: 8%;
		height: 34px;
		line-height: 20px;
		width: 95%;
		margin: auto;
		vertical-align: middle;
		outline: none;
	}
</style>
